package cn.com.zal.cgweb.pojo;

import java.util.List;

import cn.com.zal.cgweb.CgwebSessionFactory;

import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.omg.CORBA.OBJECT_NOT_EXIST;

/**
 * Data access object (DAO) for domain model
 * 
 * @author MyEclipse Persistence Tools
 */
public class BaseHibernateDAO implements IBaseHibernateDAO {

	public Session getSession() {
		return CgwebSessionFactory.getSession();
	}
	
	
	public List<Object> findByHql(String hqlStr){
		// String hql = "from Users";     
        Query query = getSession().createQuery(hqlStr);
        return query.list();  
	}
	
}